home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinMessenger 7.xpl < prev    next >
Text File  |  2002-01-10  |  2KB  |  78 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="1"
  3. "COUNT"="3"
  4. "UIPATH"="Internet\Instant Messaging\Windows Messenger\System"
  5. "NAME"="Invitation email"
  6. "LANGUAGE"="VBScript"
  7. "VERSION"="1.11"
  8. "TEXT 1"="Line 1"
  9. "TEXT 2"="Line 2"
  10. "TEXT 3"="Line 3"
  11. "DESCRIPTION 1"="When you add a new person to your contact list who doesn't yet use Windows  Messenger, the program asks you whether you would like to send an invitation email. You can customize what the email will say using this plugin."
  12. "DESCRIPTION 2"="You can use "$(brandname)" to specify the name of the program, and "${usermail}" for your email address."
  13. "DESCRIPTION 3"="Windows Messenger may be obtained at http://messenger.msn.com/"
  14. "AUTHOR"="Xteq Systems (Neil R. Turner)"
  15. "CONTACTURL"="http://www.xteq.com/"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"="iCount, therefore I am."
  18.  
  19. sP="HKLM\Software\Microsoft\MessengerService\InstallationDirectory"
  20.  
  21. Sub Plugin_Initialize
  22.  i=RegValueExists(sP)
  23.  if i=false then
  24.   Call Disable()
  25.  else
  26.   t=RegReadValue(sP)
  27.   if FileExists(t & "\mailtmpl.txt")=true then
  28.    Call TxtOpen(t & "\mailtmpl.txt")
  29.    iCount=TxtGetLineCount
  30.    if iCount=>1 then
  31.     s=TxtGetLine(1)
  32.     Call SetUIElement(1,s)
  33.    end if
  34.    if iCount=>3 then
  35.     s=TxtGetLine(3)
  36.     Call SetUIElement(2,s)
  37.    end if
  38.    if iCount=>5 then
  39.     s=TxtGetLine(5)
  40.     Call SetUIElement(3,s)
  41.    end if
  42.    Call TxtClose()
  43.   else
  44.    Call Disable()
  45.   end if
  46.  end if
  47. End Sub
  48.  
  49. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  50.  t=RegReadValue(sP)
  51.  ' Before we make any changes, backup the file! Again!
  52.  Call FileBackup(t & "\mailtmpl.txt")
  53.  
  54.  ' OK, let's go!
  55.  ' This would have been much easier if MSN had use INI files, but hey, you can't have everything...
  56.  Call TxtOpen(t & "\mailtmpl.txt")
  57.  iCount=TxtGetLineCount
  58.  
  59.  s=GetUIElement(1)
  60.  Call TxtSetLine(1,s)
  61.  Call TxtSetLine(2,"")
  62.  
  63.  s=GetUIElement(2)
  64.  Call TxtSetLine(3,s)
  65.  Call TxtSetLine(4,"")
  66.  
  67.  s=GetUIElement(3)
  68.  Call TxtSetLine(5,s)
  69.  Call TxtSave()
  70. End Sub
  71.  
  72. Sub Plugin_Terminate
  73.   Call TxtClose()
  74. End Sub
  75.  
  76.  
  77.  
  78.